<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>材料供应单签收管理详情</title>
    <meta name="renderer" content="webkit">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
    <meta name="apple-mobile-web-app-status-bar-style" content="black">
    <meta name="apple-mobile-web-app-capable" content="yes">
    <meta name="format-detection" content="telephone=no">
    <link rel="stylesheet" href="../../../resources/layui/css/layui.css" media="all">
    <link rel="stylesheet" href="../../../resources/css/style.css">
    <style>
        .details ul li {width: 50%;float: left;}
        .layui-table thead th{text-align: left;}
        thead tr th:before {content: "● "; color: #e3e3e3; font-size: 12px;}
        .layui-table td{text-indent: 1rem; font-size: 12px; color: #333;}
        .detailed{background-color: #FFF; font-size: 12px; color: #333333; padding: 15px 20px; line-height: 24px;margin-top: 15px;}
        /*.details ul,li{list-style: inherit;}*/
        .detailed p:after {
            content: "\0020";
            display: block;
            height: 0;
            clear: both;
        }
        .detailed p:before {content: "● "; color: #e3e3e3; font-size: 12px; margin-right: 5px; float: left;}
        .detailed .detaL{width: 120px;display: inline-block; float: left;    padding-right: 20px;}
        .detailed .dataR{display: inline-block;float: left;}
        .detailed p{margin-bottom: 10px;}
        .detailedfoot{margin-bottom: 50px;margin-top: 10px;}
        .detailedfoot ul li {width: 16%;float: left;}
        .layui-table thead th{text-align: left;}
        thead tr th:before {content: "● "; color: #e3e3e3; font-size: 12px;}
        .layui-table td{text-indent: 1rem; font-size: 12px; color: #333;}
        .title-list{
        	background:#E3E3E3;
        }
    </style>
</head>
<body>
<div class="_PC">
    <form class="layui-form layui-form-pane" action="" >
        <button class="layui-btn" type="button" onclick="history.back(-1);"><i class="layui-icon"></i></button>
        <button class="layui-btn" type="button" onclick="renderTable('daochu1')" style="float: right;">导出</button>

        <div class="engineering"><!--工程信息-->
            <div class="titles">郑州建材有限公司</div>
            <div class="details">
                <ul>
                    <!--<li><span class='detaL'>工程名称：</span><span class="dataR pro-details"> </span></li>-->
                    <!--<li><span class='detaL'>施工单位：</span><span class="dataR pro-details"> 现代 </span></li>-->
                    <!--<li><span class='detaL'>施工队签收状态：</span><span class="dataR pro-details">  </span></li>-->
                    <!--<li><span class='detaL'>供货地址：</span><span class="dataR pro-details"> 郑州市金水区 </span></li>-->

                </ul>
            </div>
            <div class="detailedfoot">
                <table class="table layui-table" id="daochu1">
                    <tr class="title-list">
                        <td>材料名称</td>
                        <td>材料规格</td>
                        <td>材料单位</td>
                        <td>发货数量</td>
                        <td>签收数量</td>
                        <td>审批数量</td>
                        <td>审核状态</td>
                        <td>审核意见</td>
                    </tr>
                </table>
            </div>
        </div>



    </form>

</div>
<script src="../../../resources/layui/layui.js" charset="utf-8"></script>
<script src="../../../resources/js/style.js"></script>
<script src="../../../resources/js/api.js"></script>
<script>
    layui.use(['form', 'layedit', 'laydate'], function(){
        var form = layui.form
            ,layer = layui.layer
            ,layedit = layui.layedit
            ,laydate = layui.laydate;

        //日期
        laydate.render({
            elem: '#date1'      //开始时间
        });
        laydate.render({
            elem: '#date2'  //结束时间
        });
        
      ajaxs('/api/supply/suppSignMana.do','post',{"type":"b",'remark':sessionStorage.ccuid,'p':getCookie('yanzheng')}, function (data) {                  //获取详情

//    		//console.log(sessionStorage.ccuid);
                //console.log(data);
                var datas=data.data[0];
                var zhuangtai=sessionStorage.zhuaungtai;

                switch (zhuangtai){
                    case '-1':
                        zhuangtai='等待签收';
                        break;
                    case '0':
                        zhuangtai='已签收';
                        break;
                    case '1':
                        zhuangtai='拒绝签收';
                        break;
                }

            $('.titles').text(datas.eppName+'('+datas.eppStaEnd+')')
        $('.details ul').append('  <li><span class="detaL">工程名称：</span><span class="dataR pro-details">'+datas.eppName+'('+datas.eppStaEnd+')'+' </span></li>\n' +
            '                    <li><span class="detaL">施工单位：</span><span class="dataR pro-details"> '+datas.compName1+' </span></li>\n' +
            '                    <li><span class="detaL">施工队签收状态：</span><span class="dataR pro-details">'+zhuangtai+'  </span></li>\n' +
            '                    <li><span class="detaL">供货地址：</span><span class="dataR pro-details"> '+datas.r_adr+' </span></li>\n' +
            '                  ')




          for(var i=0;i<data.data.length;i++){
                    var datas = data.data;
              switch (datas[i].validate){
                  case 0:
                      datas[i].validate='审核通过';
                      break;
                  case -1:
                      datas[i].validate='等待审核';
                      break;
                  case 1:
                      datas[i].validate='审核不通过';
                      break;

              }
                    $('#daochu1').append('<tr><td>'+datas[i].mat_Name+'</td><td>'+datas[i].mat_Spec+'</td><td>'+datas[i].mat_Bit+'</td><td>'+datas[i].send_Num+'</td><td>'+datas[i].rm_Num+'</td><td>'+datas[i].fin_Num+'</td><td>'+datas[i].validate+'</td><td>'+datas[i].reMarks+'</td></tr>');

                }
                $(function(){
				  $('td').each(function(){
				     if($(this).text()=='undefined'){
				   	 $(this).text('')
				   }
				 })
				});



    });
       









    })

</script>
</body>
</html>